#include <iostream>
#include <math.h>
using namespace std;

int main()

{
    double n1,n2;
    int a;
    cout<<"1-suma"<<endl;
    cout<<"2-resta"<<endl;
    cout<<"3-multiplicacion"<<endl;
    cout<<"4-division"<<endl;
    cout<<"5-salir"<<endl;
    cin>>a;


    while(a!=5)
   {

    switch (a)

    {
        case 1:

        cout<<"ingresar numeros"<<endl;
        cin>>n1;
        cin>>n2;
        cout<<n1+n2<<endl;
        break;


        case 2:

        cout<<"ingresar numeros"<<endl;
        cin>>n1;
        cin>>n2;
        cout<<n1-n2<<endl;
        break;


        case 3:

        cout<<"ingresar numeros"<<endl;
        cin>>n1;
        cin>>n2;
        cout<<n1*n2<<endl;
        break;


        case 4:

        cout<<"ingresar numeros"<<endl;
        cin>>n1;
        cin>>n2;
        if (n2==0)
        {
            cout<<"error"<<endl;
        }

        else
        {

        cout<<n1/n2<<endl;

        }
        break;


        default:

        cout<<"error"<<endl;

        break;



        }
    cout<<"Ingrese opcion"<<endl;
    cout<<"1-suma"<<endl;
    cout<<"2-resta"<<endl;
    cout<<"3-multiplicacion"<<endl;
    cout<<"4-division"<<endl;
    cout<<"5-salir"<<endl;
    cin>>a;

   }




























    return 1;

}
